<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
    <meta name="generator" content="Jekyll v3.8.5">
    <link rel="icon" href="">
    <title>登录</title>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet">
    <script src="/static/js/jquery-3.4.1.min.js"></script>
    <link href="/static/css/signin.css" rel="stylesheet">
    <link href="/static/sweetalert/sweetalert.css" rel="stylesheet">
    <script src="/static/sweetalert/sweetalert.js/"></script>
    <style>
        .bd-placeholder-img {
            font-size: 1.125rem;
            text-anchor: middle;
        }

        @media (min-width: 768px) {
            .bd-placeholder-img-lg {
                font-size: 3.5rem;
            }
        }
    </style>
</head>
<body class="text-center">
<form action="" method="post" class="form-signin">
    {% csrf_token %}
    <h1 class="h3 mb-3 font-weight-normal">欢迎使用</h1>
    <h5 class="mb-3 font-weight-normal" style="font-weight: bold">{{ name }}</h5>

    <input type="text" id="username" class="form-control mb-3" placeholder="用户名" name="username"
           autofocus="autofocus" maxlength="12">
    <label for="inputPassword" class="sr-only">Password</label>
    <input type="password" id="userpwd" class="form-control" placeholder="密码"
           name="password" maxlength="18">
    <div class="checkbox mb-3">
        <label>
            <input type="checkbox" value="remember-me" name="remember"> 14天内自动登录
        </label>
    </div>
    <div>
        <a type="button" class="btn btn-info" href="/regist/">注册</a>
        <button type="submit" class="btn btn-success">登录</button>
    </div>
    <p class="mt-5 mb-1 text-muted">Copyright © 2012-2019</p>
    <p class="text-muted">联系作者：348553233@qq.com</p>
</form>
</body>
<script>
    if ('{{ msg }}') {
        swal({
            title: "错误提示",
            text: "{{ msg }}",
            type: "warning",
            confirmButtonClass: "btn-danger",
            confirmButtonText: "确定!",
        })
    }
</script>
</html>